package com.iqiyi.pps.epg.core.model.house;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

@Entity
@Table(name = "t_channel")
@Cache(usage = CacheConcurrencyStrategy.NONE)
public class House {
    public static final Map<String, String> BITRATE_MAP = new HashMap<String, String>() {{
        put("ld", "流畅");
        put("sd", "标清");
        put("hd", "高清");
    }};

    public static final Map<String, String> RECOMMEND_MAP = new HashMap<String, String>() {{
        put("home", "首页");
        put("channel", "频道页");
    }};

    public static final Map<Integer, String> BASE_STATUS_MAP = new HashMap<Integer,String>() {{
        put(0, "否");
        put(1, "是");
    }};

    public static final Map<Integer, String> STATUS_MAP = new HashMap<Integer, String>() {{
        put(1, "关闭");
        put(2, "非直播");
        put(3, "直播中");
    }};

    public static final Map<Integer, String> TYPE_ID_MAP = new HashMap<Integer, String>() {{
        put(1, "channel");
        put(2, "show");
        put(3, "game");
    }};

    private Long id;
    private Long typeId;
    private Long userId;
    private String name;
    private String bitrateSupport;
    private String recommend;
    private Integer live;  //类型
    private Integer vod;  //类型
    private Integer status;  //类型
    private Timestamp recentTime;
    private Timestamp createdTime=new Timestamp(System.currentTimeMillis());

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id=id;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "is_live")
    public Integer getLive() {
        return live;
    }

    public void setLive(Integer live) {
        this.live = live;
    }

    @Column(name = "is_vod")
    public Integer getVod() {
        return vod;
    }

    public void setVod(Integer vod) {
        this.vod = vod;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Timestamp getRecentTime() {
        return recentTime;
    }

    public void setRecentTime(Timestamp recentTime) {
        this.recentTime = recentTime;
    }

    public Timestamp getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Timestamp createdTime) {
        this.createdTime = createdTime;
    }

    public String getBitrateSupport() {
        return bitrateSupport;
    }

    public void setBitrateSupport(String bitrateSupport) {
        this.bitrateSupport = bitrateSupport;
    }

    public String getRecommend() {
        return recommend;
    }

    public void setRecommend(String recommend) {
        this.recommend = recommend;
    }
}
